package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GoodsListMapper;
import com.ruoyi.system.domain.GoodsList;
import com.ruoyi.system.service.IGoodsListService;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-05-24
 */
@Service
public class GoodsListServiceImpl implements IGoodsListService 
{
    @Autowired
    private GoodsListMapper goodsListMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public GoodsList selectGoodsListById(Integer id)
    {
        return goodsListMapper.selectGoodsListById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param goodsList 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<GoodsList> selectGoodsListList(GoodsList goodsList)
    {
        return goodsListMapper.selectGoodsListList(goodsList);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param goodsList 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertGoodsList(GoodsList goodsList)
    {
        return goodsListMapper.insertGoodsList(goodsList);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param goodsList 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateGoodsList(GoodsList goodsList)
    {
        goodsList.setUpdateTime(DateUtils.getNowDate());
        return goodsListMapper.updateGoodsList(goodsList);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteGoodsListByIds(Integer[] ids)
    {
        return goodsListMapper.deleteGoodsListByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteGoodsListById(Integer id)
    {
        return goodsListMapper.deleteGoodsListById(id);
    }

    @Override
    public int updateGoodsListByCommonId(GoodsList goodsList) {
        return goodsListMapper.updateGoodsListByCommonId(goodsList);
    }

    @Override
    public int deleteGoodsListByCommonId(String ids) {
        return goodsListMapper.deleteGoodsListByCommonId(ids);
    }
}
